using System;
using System.Data;
using System.Data.SqlClient; 

/// <summary>
/// Summary description for SqlServerTransaction
/// </summary>
public partial class SqlServerProvider
{

    #region	 ExecuteNonQuery
    public int ExecuteNonQuery()
    {
        InitParameters();        
        int rows = sqlCommand.ExecuteNonQuery();

        if (returnValueParameter != "")
            returnValue = Convert.ToInt32(
            sqlCommand.Parameters[
            returnValueParameter].Value);
            
        sqlCommand.Dispose();
        return rows;

    }
     
    #endregion

    #region ExecuteScalar
    public object ExecuteScalar()
    {
        InitParameters(); 
        object obj = sqlCommand.ExecuteScalar();

        if (returnValueParameter != "")
            returnValue = Convert.ToInt32(
            sqlCommand.Parameters[
            returnValueParameter].Value);
            
        sqlCommand.Dispose();
        return obj;
    }
     
     
    #endregion
    
}
 